Skip to content

Conversation

@nicknisi
Copy link
Member

@nicknisi nicknisi commented Apr 18, 2025

This allows a "return to" URL to be defined and will be passed to the getLogoutUrl method.

capture_20250418_160334.mp4

@nicknisi nicknisi requested a review from Copilot April 18, 2025 20:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a "returnTo" parameter to the signOut process, allowing a return URL to be specified during logout.

  • Adds a returnTo parameter to terminateSession in src/session.ts and propagates it to getLogoutUrl and redirect calls.
  • Updates signOut in src/auth.ts to accept the returnTo parameter and passes it to terminateSession.
  • Extends tests in src/session.spec.ts and src/auth.spec.ts to cover behavior with and without a provided returnTo argument.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/session.ts Updated terminateSession to take an optional returnTo argument and use it when constructing the logout URL.
src/session.spec.ts Added tests covering both session and non-session scenarios when using the new returnTo parameter.
src/auth.ts Modified signOut to accept a returnTo parameter and pass it onto terminateSession.
src/auth.spec.ts Included tests to ensure signOut behaves as expected with and without a provided returnTo URL.

@nicknisi nicknisi marked this pull request as ready for review April 18, 2025 20:51
@nicknisi nicknisi requested a review from dandorman April 18, 2025 21:04
@nicknisi nicknisi merged commit a00cd7e into main Apr 18, 2025
6 checks passed
@nicknisi nicknisi deleted the nicknisi/signout-return-to branch April 18, 2025 22:07
@nicknisi nicknisi mentioned this pull request Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants